package com.tz.thread;

/**
 * 线程变量工具类
 * 可以定义在线程存放的数据类型
 */
public class MyThreadLocal {

    //变量的存取 by thread
    private static ThreadLocal<String> threadLocal = new ThreadLocal<String>();

    public static String get(){
        return threadLocal.get();
    }

    public static void set(String s){
        threadLocal.set(s);
    }

}
